//
//  PreviewHookUpUserPhotoViewController.m
//  ChatForHot
//
//  Created by wr on 2018/10/15.
//  Copyright © 2018年 FLY. All rights reserved.
//

#import "PreviewUserPhotoViewController.h"

@interface PreviewUserPhotoViewController ()

@end

@implementation PreviewUserPhotoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    self.navigationController.navigationBar.barTintColor = [UIColor colorFromHexString:@"FFD24C"];
    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)performLayout {
    [super performLayout];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"backBtnImg"] style:(UIBarButtonItemStylePlain) target:self action:@selector(doneButtonPressed:)];
    
    if (self.isSelf) {
        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"photo_deletenav"] style:(UIBarButtonItemStylePlain) target:self action:@selector(deletePhoto)];
    }else{
        self.navigationItem.rightBarButtonItem = nil;
    }
}

- (void)setNavBarAppearance:(BOOL)animated {
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}

- (void)deletePhoto{
    if (self.delegate && [self.delegate respondsToSelector:@selector(deletePhotoAtIndex:)]) {
        [self.delegate deletePhotoAtIndex:self.currentIndex];
    }
}
@end
